package com.my.demo.oauthService.service;

import java.net.UnknownHostException;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.sql.DataSource;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

@Configuration
public class ResourceApiPathConfig {

	@Resource
	private DataSource dataSource;

	@Resource
	RedisTemplate<String, Map<String, List<String>>> redisTemplate;

	@Bean
	public RedisResourceService resourcePathDetails() throws UnknownHostException {
		return new RedisResourceService(dataSource, redisTemplate);
	}
}